package user

import (
	"gitcode.com/G-YT/baoyou/server/global"
	"gitcode.com/G-YT/baoyou/server/model/manager"
)

// BindRecord 用户绑定健管师
type BindRecord struct {
	global.GvaModel
	ManagerID     uint                  `json:"managerID" form:"managerID" gorm:"column:managerID;comment:健康管理师ID;"`                //健康管理师ID
	HealthManager manager.HealthManager `json:"healthManager" gorm:"foreignKey:managerID;references:HmID;comment:关联健管师;"`           // 关联健管师结构体
	Status        uint                  `json:"status" form:"status" gorm:"column:status;default:1;comment:审核状态 1待审核&已申请 2通过 3驳回;"` //审核状态
	UserID        uint                  `json:"userID" form:"userID" gorm:"column:userID;comment:用户ID;"`                            //用户ID
	User          User                  `json:"user" gorm:"foreignKey:UserID;references:ID;comment:关联用户;"`                          // 关联用户结构体
}

// TableName 用户绑定健管师 UserBindManager fd_user_bind_manage
func (BindRecord) TableName() string {
	return "by_user_bind_record"
}
